package Day014_Lambda表达式_Stream流.ZuoYe.Test4;

import java.util.stream.Stream;

/**
 * @author zhangyan
 * @date 2020/5/5 18:18
 */
public class Test1 {
    public static void main(String[] args) {
        //获取Stream流
        Stream<String> stream = Stream.of("黄药师", "冯蘅", "郭靖", "黄蓉", "郭芙", "郭襄", "郭破虏");

        //过滤元素
        stream.filter((String s) -> {
            return s.startsWith("郭");
        }).forEach((String s) -> {
            System.out.println(s);
        });
    }
}
